/*
 *  author: lichuang
 *  2010-09-27
 */
#ifndef __CLRS_STUDY_QUEUE_H__
#define __CLRS_STUDY_QUEUE_H__

typedef struct queue_node_t {
  struct queue_node_t *next, *prev;
  int value;
} queue_node_t;

typedef struct queue_t {
  struct queue_node_t *head, *tail;
} queue_t;

extern queue_t* queue_create();
extern void queue_destroy(queue_t *queue);
extern void queue_print(const queue_t *queue, const char *msg);
extern void enqueue(queue_t *queue, int value);
extern int  dequeue(queue_t *queue);

#endif  //  __CLRS_STUDY_QUEUE_H__
